# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Michał Pałubicki <maln0ir@gmx.com>

_pyname=leather
pkgname=python-$_pyname
pkgver=0.3.4
pkgrel=3
pkgdesc='Python charting for 80% of humans'
arch=(any)
url="https://$_pyname.readthedocs.io"
license=(MIT)
depends=(python
         python-six)
makedepends=(python-{build,installer,wheel}
             python-setuptools)
checkdepends=(python-cssselect
              python-lxml)
_archive="$_pyname-$pkgver"
source=("$_archive.tar.gz::https://github.com/wireservice/$_pyname/archive/$pkgver.tar.gz")
sha256sums=('8dc9545ccdd998527e283c7990535bfe0628ac71c660737c5c266ee0e461e341')

build() {
	cd "$_archive"
	python -m build -wn
}

check() {
	cd "$_archive"
	python -m unittest discover -vs tests
}

package() {
	cd "$_archive"
	python -m installer -d "$pkgdir" dist/*.whl
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
}
